package com.luo.wheresmytakeaway.service.impl;

import com.luo.wheresmytakeaway.mapper.OrderMapper;
import com.luo.wheresmytakeaway.pojo.Order;
import com.luo.wheresmytakeaway.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public List<Order> getOrderService(Integer uid) {
        return orderMapper.getOrderService(uid);
    }

    @Override
    public void addOrder(Order order) {
        orderMapper.addOrder(order);
    }


    @Override
    public void deleteOrder(List<Integer> id) {
        orderMapper.deleteOrder(id);
    }

    @Override
    public List<Order> getOrderListByStatus(Integer status,  Integer uid) {
        return orderMapper.getOrderListByStatus(status,uid);
    }
}
